﻿#pragma once

//----------------------------------------------------------------------------------------
//	Copyright © 2004 - 2021 Tangible Software Solutions, Inc.
//	This class can be used by anyone provided that the copyright notice remains intact.
//
//	This class includes methods to convert multidimensional arrays to C++ vectors.
//----------------------------------------------------------------------------------------
#include <vector>

class RectangularVectors
{
public:
    static std::vector<std::vector<CellInfo*>> RectangularCellInfoVector(int size1, int size2)
    {
        std::vector<std::vector<CellInfo*>> newVector(size1);
        for (int vector1 = 0; vector1 < size1; vector1++)
        {
            newVector[vector1] = std::vector<CellInfo*>(size2);
        }

        return newVector;
    }

    static std::vector<std::vector<Cell*>> RectangularCellVector(int size1, int size2)
    {
        std::vector<std::vector<Cell*>> newVector(size1);
        for (int vector1 = 0; vector1 < size1; vector1++)
        {
            newVector[vector1] = std::vector<Cell*>(size2);
        }

        return newVector;
    }

    static std::vector<std::vector<Door*>> RectangularDoorVector(int size1, int size2)
    {
        std::vector<std::vector<Door*>> newVector(size1);
        for (int vector1 = 0; vector1 < size1; vector1++)
        {
            newVector[vector1] = std::vector<Door*>(size2);
        }

        return newVector;
    }

    static std::vector<std::vector<MineSpot*>> RectangularMineSpotVector(int size1, int size2)
    {
        std::vector<std::vector<MineSpot*>> newVector(size1);
        for (int vector1 = 0; vector1 < size1; vector1++)
        {
            newVector[vector1] = std::vector<MineSpot*>(size2);
        }

        return newVector;
    }
};
